package nothing.model;

import java.math.BigDecimal;
import java.util.List;

public class Qty {

	private BigDecimal qty;
	private Measurement measurement;



    public Qty(BigDecimal qty,Measurement measurement) {
		super();
		this.measurement = measurement;
		this.qty = qty;
	}



	public BigDecimal getQty() {
		return qty;
	}



	public void setQty(BigDecimal qty) {
		this.qty = qty;
	}



	public Measurement getMeasurement() {
		return measurement;
	}



	public void setMeasurement(Measurement measurement) {
		this.measurement = measurement;
	}



	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result
				+ ((measurement == null) ? 0 : measurement.hashCode());
		result = prime * result + ((qty == null) ? 0 : qty.hashCode());
		return result;
	}



	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		Qty other = (Qty) obj;
		if (measurement == null) {
			if (other.measurement != null)
				return false;
		} else if (!measurement.equals(other.measurement))
			return false;
		if (qty == null) {
			if (other.qty != null)
				return false;
		} else if (!qty.equals(other.qty))
			return false;
		return true;
	}



	public String toString() {
        return ""+qty + measurement;
    }
}
